import tkinter as tk
import random

def lottery():
    prizes = ["手机", "平板电脑", "耳机", "未中奖"]
    result = random.choice(prizes)
    result_label.config(text=f"抽奖结果：{result}")

# 创建主窗口
root = tk.Tk()
root.title("抽奖游戏")

# 创建按钮
lottery_button = tk.Button(root, text="点击抽奖", command=lottery)
lottery_button.pack(pady=20)

# 创建结果标签
result_label = tk.Label(root, text="")
result_label.pack(pady=10)

# 运行主循环
root.mainloop()